
<div style="padding:20px">
<div id="invitation_facebook">

<p style="font-size:10pt">
Invite your friends to Gausipp and earn points. These points may unlock some cool new features for you.</p>

<table style="width:100%"><tr>
<td valign="top">
<!--
<p>
1. 50 points will unlock image and video posting<br>
2. 100 points will allow you to make a columnist page.<br>
</p>

<!--how to get points-->
<!--<p>You get<br>
1. 5 points for each member that logins with your invite.<br>
</p>-->

</td>

<td valign="top" style="width:25%">
<!-- displaying user points-->
<?php
$temp = mysql_query("SELECT `points` FROM site_user_meta WHERE `fbid`='$user'");
if(!$temp) echo mysql_error();
$points = mysql_result($temp, 0, 'points');
echo '<p> Your points:<br> <strong style="font-size:15pt">'.$points.'</strong></p>';
?>
</td></tr>
</table>

<p>Your invitation will look something like this: </p>
<img src="images/invite.png" class="img"/><br/><br/>

<?php

$refurl = urlencode("http://gausipp.roopunk.com/login.php?action=login&refid=".$user."");
$redirecturi = urlencode("http://gausipp.roopunk.com/index.php?cat=invitesent");

$url = "http://www.facebook.com/dialog/send?app_id=121250027990936&";
$url = $url."name=Join%20me%20at%20Gausipp&";
$url = $url."link=".$refurl."&";
$url = $url."redirect_uri=".$redirecturi."&";
?>
<input type="hidden" value="<?php echo $url; ?>" id="invitation_url" />
<button onclick='window.location = "<?php echo $url; ?>picture=http://roopunk.com/gausipp/images/logo.png";'  class="button" class="invite_select">Select Friends</button>
</div>

<!-- displaying user points-->

<?php
$temp = mysql_query("SELECT * FROM site_invite WHERE `ref_fbid`='$user'");
if(!$temp) echo mysql_error();
if(mysql_numrows($temp) != 0 )
echo '<p>Friends invited by you who joined gausipp</p>';

disp_user($temp,"general","");

echo '</div>';

?>
